package kcms.message.dao;

import java.util.List;

import kcms.db.Course;
import kcms.db.Message;
import kcms.db.Messagestatus;
import kcms.db.PptAndContent;
import kcms.db.TeachStudent;
import kcms.db.ViewAssignScore;
import kcms.db.ViewMessage;

public interface MessageDAO {
	//在数据库查询所有老师教授的班级
	public List<TeachStudent> getAllTeach(String tid);
	//添加通知
	public boolean addMessage(Message m);
	//更新某一条通知
	public void updateMessage(Message m);
	//按照id去更新消息的状态
	public void updateMessagestatus(Messagestatus ms);
	//根据id得到消息状态表
	public List<Messagestatus> getMessagestatusById(int messageid);
	//查询某一个教师发布的通知
	public List<Message> getHisMessage(String tid);
	//根据cid查询相应的课程
	public Course getOneCourse(String cid);
	//查询所有课程
	public List<Course> getAllCourse();
	//根据指定的messageid去删除
	public void deleteMessage(int messageid);
	//得到指定id的消息的已读和未读
	public List<Messagestatus> getHisMessagestatus(String sid);
	//得到一条指定id的消息
	public Message getOneMessage(int messageid);
	public ViewMessage getOneVMessage(int messageid,String sid);
	//通过sid去得到用户的所有消息
	public List<ViewMessage> getAllMessagesBySid();
	//通过sender去查找所有用户的消息
	public List<ViewMessage> getAllMessagesBySender(String sender);
	//按照条件去更改消息的排序
	public List<ViewMessage> getAllMessagesByCondition(String condition);
    //
	public List<ViewMessage> getForPage(final int offset, final int length,String condition,String uid);
	
	public int getAllRowCount(String condition,String uid);
	//更改消息的状态
	public void updateMessageStatus(Messagestatus messageStatus);
	
	public Messagestatus getOneMessageStatusById(int messageid,String sid);
	//查询pptAndContent
	public List<PptAndContent>  listPptMessages(String sid);
	public List<ViewAssignScore> listAssignMessages(String condition,String sid);
    public ViewAssignScore getOneAssignMessage(int assignmentid);
    public void updateAssignMessage(ViewAssignScore va);
}
